<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="./react/react17.development.js"></script>
    <script src="./react/react-dom17.development.js"></script>
</head>

<body>
    <button></button>

    <div class="box"></div>
    <script>
        // React.createElement()
        /* 
                var p = document.createElement('p');
                console.log(p); // dom 对象 | 标签对象
        
                var but = document.querySelector('button');
                console.log(but);// dom 对象 | 标签对象
        
                var b = $('button');
                console.log(b); // jquery对象 | 标签对象
         */

        // React.createElement() (标签名称，标签属性，标签内容1，标签内容2)
        var span = React.createElement('span', null, '内容');
        console.log(span); // React对象

        var p = React.createElement('p', null, span);
        console.log(span);

        var box = document.querySelector('.box');
        // 将创建的react对象 渲染到box这个标签内 box这个标签是一个dom标签
        ReactDOM.render(p, box);
    </script>
</body>

</html>